<?php
/**
 * XiteCode generic tools namespace.
 *
 * This class is mainly a collection of globally used methods
 *
 * @copyright (c) 2006 A.Sleep <a.sleep@asleep.net> under the GNU GPL version 2
 * @author A.Sleep <a.sleep@asleep.net>
 * @package core
 * @access public
 */

class Tools {

  /**
   * Uses dBug to pretty output data.
   *
   * This method can be used (Tools::dump($someObject);) rather then
   * var_dump, print_r, etc.
   *
   * @see dBug.php
   * @param mixed $var Can be any datatype
   * @param bool $die If set to true script execution will end after output
   */

  public function dump($var, $die = false)
  {
    require RELATIVE_ROOT.'Classes/dBug.php';
    new dBug($var);
    if ($die) {
      exit;
    }
    return;
  }

}

?>
